#include"comm.h"

int main()
{
    key_t key = ftok(PATHNAME, PROJ_ID);
    if(key < 0)
    {
        perror("ftok error!");
        return 1;
    }

    int shm = shmget(key, SIZE, IPC_CREAT);
    if(shm < 0)
    {
        perror("shmget fail!");
        return 2;
    }

    printf("key: %x\n", key); 
	printf("shm: %d\n", shm);

    char * mem = (char*)shmat(shm, NULL, 0);
    
    while(1)
    {
        
    }

    shmdt(mem);
    //shmctl(shm, IPC_RMID, NULL);
    return 0;
}